<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>

<?php if (!empty($this->options->sidebarBlock) && in_array('ShowAboutMe', $this->options->sidebarBlock)): ?>
<aside class="widget amadeus_about clearfix">
    <div class="photo-background" style="background:url(<?php $this->options->themeUrl('images/about.jpg'); ?>) no-repeat center center; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;">
    </div>
    <div class="photo-wrapper clearfix">
        <div class="photo-wrapper-tip text-center">
            <img class="about-photo" src="<?php $this->options->themeUrl('images/avatar.png'); ?>">
        </div>
    </div>
    <div class="textwidget">
        <p><?php $this->options->aboutMe() ?></p>
    </div>
</aside>
<?php endif; ?>

<?php if (!empty($this->options->sidebarBlock) && in_array('ShowRecentPosts', $this->options->sidebarBlock)): ?>
<aside class="widget clearfix">
    <h4 class="widget-title"><?php _e('最新文章'); ?></h4>
    <ul class="list-group">
        <?php $this->widget('Widget_Contents_Post_Recent')
        ->parse('<a href="{permalink}"><i class="fa fa-book"></i> {title}</a>'); ?>
    </ul>
</aside>
<?php endif; ?>

<?php if (!empty($this->options->sidebarBlock) && in_array('ShowRecentComments', $this->options->sidebarBlock)): ?>
<aside class="widget clearfix">
    <h4 class="widget-title"><?php _e('最近回复'); ?></h4>
	<ul class="list-group">
        <?php $this->widget('Widget_Comments_Recent')->to($comments); ?>
        <?php while($comments->next()): ?>
            <a href="<?php $comments->permalink(); ?>"><?php $comments->author(false); ?></a>: <?php $comments->excerpt(35, '...'); ?>
        <?php endwhile; ?>
    </ul>
</aside>
<?php endif; ?>

<?php if (!empty($this->options->sidebarBlock) && in_array('ShowCategory', $this->options->sidebarBlock)): ?>
<aside class="widget clearfix">
    <h4 class="widget-title"><?php _e('分类目录'); ?></h4>
    <?php $this->widget('Widget_Metas_Category_List')->listCategories('wrapClass=widget-list'); ?>
</aside>
<?php endif; ?>

<?php if (!empty($this->options->sidebarBlock) && in_array('ShowArchive', $this->options->sidebarBlock)): ?>
<aside class="widget clearfix">
    <h4 class="widget-title"><?php _e('文章归档'); ?></h4>
    <ul class="list-group">
        <?php $this->widget('Widget_Contents_Post_Date', 'type=month&format=F Y')
        ->parse('<a href="{permalink}">{date}</a>'); ?>
    </ul>
</aside>
<?php endif; ?>